AWT Context Callbacks Structure
When you create an AWT context associated with a session, you must pass a data structure that supplies callback information. The AWT context callback data structure is defined by theJMAWTContextCallbacks
data type.
struct JMAWTContextCallbacks { UInt32 fVersion; JMRequestFrameProcPtr fRequestFrame; JMReleaseFrameProcPtr fReleaseFrame; JMUniqueMenuIDProcPtr fUniqueMenuID; JMExceptionOccurredProcPtr fExceptionOccurred; };
Field Description
fVersion
- The version of JManager. You should set this field to
kJMVersion
.fRequestFrame
- A pointer to a function that creates a new frame. The client application must set up the new frame and supply callbacks for the new frame. This callback function has the following type definition:
typedef OSStatus (*JMRequestFrameProcPtr) ( JMAWTContextRef context, JMFrameRef newFrame, JMFrameKind kind, UInt32 width, UInt32 height, Boolean resizeable, JMFrameCallbacks* callbacks);
- For more information, see the description of the application-defined function
MyRequestFrame
(page 99).fReleaseFrame
- A pointer to a function that removes a frame. This callback function has the following type definition:
typedef OSStatus (*JMReleaseFrameProcPtr) ( JMAWTContextRef context, JMFrameRef oldFrame);
- For more information, see the application-defined function
MyReleaseFrame
(page 100).fUniqueMenuID
- A pointer to a function that allocates a unique menu ID for later use in creating a menu. This callback function has the following type definition:
typedef SInt16 (*JMUniqueMenuIDProcPtr) ( JMAWTContextRef context, Boolean isSubmenu);
- For more information, see the description of the application-defined function
MyUniqueMenuID
(page 101).fExceptionOccurred
- A pointer to an exception notification function. This function can indicate only that an error occurred; you cannot recover from the exception using this function. This callback function has the following type definition:
typedef void (*JMExceptionOccurredProcPtr) ( JMAWTContextRef context, const char* exceptionName, const char* exceptionMsg, const char* stackTrace);
- For more information, see the description of the application-defined function
MyExceptionOccurred
(page 101).